import { ButtonEven } from '../../../Bridge/UIBridge';
import { App } from '../../../Framework/Core/App';
import { CtrlBase } from '../../../Framework/Core/CtrlBase';

import Util from '../../../Framework/Util/Util';
import CtrlName from '../../UIDefine';
import { LoginView } from './LoginView';

/**
 * 登录页面控制器
 */
export class LoginCtrl extends CtrlBase   
{

    public declare view:LoginView

    public  OnAwake(args:any)
    {
        Util.Log("LoginCtrl OnAwake");
    }


    public  OnCreate()
    {
        ButtonEven.SetClickEvent(this.view.loginBtn,()=>{
            this.testClick();
        })

     
    }

    testClick()
    {
        Util.Log("testClick");
        App.Instance.ctrlMgr.JumpTo(CtrlName.Home);
    }

    public OnShow()
    {
        Util.Log("OnShow");
        this.view.ShowOk() 
        
    }

    public Update(dt: number)
    {
    }
    
}

